
function lineEvt(data1,data2,lengend,ele){
    var timeData= ['2017-03','2017-04','2017-05','2017-06','2017-07','2017-08','2017-09','2017-10','2017-11','2017-12','2018-01','2018-02']
    var lineOption = {
        color : ["#1de5f2","#0edf4d"],
        tooltip : {
            trigger: 'axis',
        },
        legend: {
            orient: 'horizontal',
            right:20,
            data:lengend,
            textStyle:{
                color:'#fff'
            }
        },
        grid: {
            top:30,
            left: '4%',
            right: '4%',
            bottom: 30,
            containLabel: true
        },
        xAxis: {
            boundaryGap : false,
            type: 'category',
            splitLine:{    //grid区域分隔线
                show:false,
                lineStyle: {
                    width:1,
                    type:"solid",
                    color:"#2a3f7e"
                }
            },
            axisLabel: {  //坐标轴标签
                show: true,
                textStyle: {
                    color: '#0d7790'
                }
            },
            axisTick: {
                show: false   //刻度线
            },
            axisLine:{
                show: false,   //坐标轴轴线
                lineStyle: {
                    width:1,
                    color:"#fff"
                }
            },
            data : timeData
        },
        yAxis : {
            splitLine:{    //grid区域分隔线
                show:true,
                lineStyle: {
                    width:1,
                    type:"solid",
                    color:"#2a3f7e"
                }
            },
            axisTick: {
                show: false   //刻度线
            },
            axisLine: {
                show: false ,  //坐标轴轴线
                lineStyle: {
                    width:1,
                    color:"#fff"
                }
            },
            axisLabel: {  //坐标轴标签
                show: true
            },
        },
        series : [
            {
                name:lengend[0],
                type:'line',
                symbol:'none',  //这句就是去掉点的
                smooth:true,  //这句就是让曲线变平滑的
                lineStyle: { normal: {
                    color:'#1de5f2',
                }},
                areaStyle: {
                    normal: {
                        color:'#1de5f2',
                        opacity: 0.2
                    }
                },
                data:data1
            },
            {
                name:lengend[1],
                type:'line',
                symbol:'none',  //这句就是去掉点的
                smooth:true,
                lineStyle: { normal: {
                    color:'#0edf4d',
                }},
                data:data2
            }
        ]
    };
    var lineChart = echarts.init(document.getElementById(ele))
    lineChart.setOption(lineOption);
    window.addEventListener("resize", function () {
        lineChart.resize();
    });
}

var line1data1=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
var line1data2=[476309, 541242,584939, 592913,604113, 621489, 633518, 672287, 701405, 870075, 901718, 910618]
var line1lengend=["IDC用户信息","云用户信息"]
lineEvt(line1data1,line1data2,line1lengend,"IDCline1")

var line2data1=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
var line2data2=[1085774, 1209833, 1271794, 1286207, 1309175, 1347081, 1369209, 1384501, 1405938, 1917604, 2012145, 2014458]
var line2lengend=["IDC域名数量","云域名数量"]
lineEvt(line2data1,line2data2,line2lengend,"IDCline2")

var line3data1=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
var line3data2=[176794, 3044135, 3218624, 3277477, 3504852, 3724017, 3850253, 3856838, 4223857, 4478177, 4528890, 5309547]
var line3lengend=["IDC IP数量","云IP数量"]
lineEvt(line3data1,line3data2,line3lengend,"IDCline3")

var line4data1=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
var line4data2=[4425178, 4436498, 4723298, 4750253, 4814883, 4882707, 4921917, 4997647, 5166837, 6981441, 7137144, 7175964]
var line4lengend=["IDC宽带信息","云宽带信息"]
lineEvt(line4data1,line4data2,line4lengend,"IDCline4")




